package com.liy.supercloud.ssoserver.feign;

import com.liy.framework.common.extvo.ResultVO;
import com.liy.framework.common.webmsg.WebMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Component
@FeignClient(
        name = "webmessage",
        fallbackFactory = WebMessageClientFallbackFactory.class
)
public interface WebMessageClient {
    @ResponseBody
    @RequestMapping(
            value = {"/webMessage/sendClient/{clientId}"},
            method = {RequestMethod.POST}
    )
    ResultVO sendClient(@RequestBody WebMessage var1, @PathVariable("clientId") String var2) throws Exception;

    @ResponseBody
    @RequestMapping(
            value = {"/webMessage/sendGroup/{clientId}"},
            method = {RequestMethod.POST}
    )
    ResultVO sendGroup(@RequestBody WebMessage var1, @PathVariable("groupId") String var2) throws Exception;

    @ResponseBody
    @RequestMapping(
            value = {"/webMessage/sendRole/{roleId}"},
            method = {RequestMethod.POST}
    )
    ResultVO sendRole(@RequestBody WebMessage var1, @PathVariable("roleId") String var2) throws Exception;
}
